<?php 
class User_model extends CI_Model{
    
    public function get_users($cond){
        $this->db->join('user_category','users.user_category_id=user_category.user_category_id','left');
        $this->db->where($cond);
        return $this->db->get('users');
    
    }
     public function create($data){
        $this->db->insert('users',$data);
        return $this->db->insert_id();
        
    }
    public function get_user_category($cond){
        $this->db->where($cond);
        return $this->db->get('user_category');
    }
    public function create_user_category($data){
         $this->db->insert('user_category',$data);
        return $this->db->insert_id();
    }
}
?>